package org.l.qiao.base;

import org.l.qiao.annotation.Key;

/**
 * Created by 严秋旺 on 2015/6/14.
 */
public class LFloat implements LType {

    @Override
    public int getLType() {
        return LTYPE_FLOAT;
    }

    @Override
    public Object parse(Key key, String value) {
        return parse(value);
    }

    @Override
    public Object parse(String value) {

        if (value != null) {
            return Float.parseFloat(value);
        }

        return 0.0f;
    }

    @Override
    public String toString(Object object) {
        return String.valueOf(object);
    }
}
